package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BbgAdviceMapper;
import com.ruoyi.system.domain.BbgAdvice;
import com.ruoyi.system.service.IBbgAdviceService;

/**
 * 会员建议Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-21
 */
@Service
public class BbgAdviceServiceImpl implements IBbgAdviceService 
{
    @Autowired
    private BbgAdviceMapper bbgAdviceMapper;

    /**
     * 查询会员建议
     * 
     * @param id 会员建议主键
     * @return 会员建议
     */
    @Override
    public BbgAdvice selectBbgAdviceById(Long id)
    {
        return bbgAdviceMapper.selectBbgAdviceById(id);
    }

    /**
     * 查询会员建议列表
     * 
     * @param bbgAdvice 会员建议
     * @return 会员建议
     */
    @Override
    public List<BbgAdvice> selectBbgAdviceList(BbgAdvice bbgAdvice)
    {
        return bbgAdviceMapper.selectBbgAdviceList(bbgAdvice);
    }

    /**
     * 新增会员建议
     * 
     * @param bbgAdvice 会员建议
     * @return 结果
     */
    @Override
    public int insertBbgAdvice(BbgAdvice bbgAdvice)
    {
        bbgAdvice.setCreateTime(DateUtils.getNowDate());
        return bbgAdviceMapper.insertBbgAdvice(bbgAdvice);
    }

    /**
     * 修改会员建议
     * 
     * @param bbgAdvice 会员建议
     * @return 结果
     */
    @Override
    public int updateBbgAdvice(BbgAdvice bbgAdvice)
    {
        bbgAdvice.setUpdateTime(DateUtils.getNowDate());
        return bbgAdviceMapper.updateBbgAdvice(bbgAdvice);
    }

    /**
     * 批量删除会员建议
     * 
     * @param ids 需要删除的会员建议主键
     * @return 结果
     */
    @Override
    public int deleteBbgAdviceByIds(Long[] ids)
    {
        return bbgAdviceMapper.deleteBbgAdviceByIds(ids);
    }

    /**
     * 删除会员建议信息
     * 
     * @param id 会员建议主键
     * @return 结果
     */
    @Override
    public int deleteBbgAdviceById(Long id)
    {
        return bbgAdviceMapper.deleteBbgAdviceById(id);
    }
}
